package com.ourteam.product.ui.domain;
/**
 * Template Name : DTO数据对象 Template Version : 1 Template Last Modfiy Date : Fri Nov 30 16:49:33 CST
 * 2018 Auto Generate Date : 2018-12-14 15:15:47 Warning ! This file will be overwrite when
 * regenerate !
 */
import java.util.HashMap;
import java.util.Map;
import net.dao.IDataPopulateCallback;
import org.apache.commons.beanutils.BeanMap;
import org.apache.commons.lang.ArrayUtils;

public class ProductUIFormFieldTypeBean implements java.io.Serializable {

  private static Map<String, String> mappedDaoFields = new HashMap<String, String>();

  private com.ourteam.product.ui.dao.ProductUIFormFieldType productUIFormFieldType;

  protected BeanMap getBeanMap() {

    return new BeanMap(productUIFormFieldType);
  }

  static {
    mappedDaoFields.put("id", com.ourteam.product.ui.dao.IProductUIFormFieldTypeDAO.Id);

    mappedDaoFields.put("typeName", com.ourteam.product.ui.dao.IProductUIFormFieldTypeDAO.TypeName);

    mappedDaoFields.put(
        "typeWidget", com.ourteam.product.ui.dao.IProductUIFormFieldTypeDAO.TypeWidget);

    mappedDaoFields.put(
        "allowSubField", com.ourteam.product.ui.dao.IProductUIFormFieldTypeDAO.AllowSubField);

    mappedDaoFields.put(
        "lastModifyUser", com.ourteam.product.ui.dao.IProductUIFormFieldTypeDAO.LastModifyUser);

    mappedDaoFields.put(
        "lastModifyTime", com.ourteam.product.ui.dao.IProductUIFormFieldTypeDAO.LastModifyTime);

    mappedDaoFields.put("status", com.ourteam.product.ui.dao.IProductUIFormFieldTypeDAO.Status);

    mappedDaoFields.put("remarks", com.ourteam.product.ui.dao.IProductUIFormFieldTypeDAO.Remarks);

    mappedDaoFields.put("typeIcon", com.ourteam.product.ui.dao.IProductUIFormFieldTypeDAO.TypeIcon);
  }

  public static String getMappedDAOField(String aAttrName) {
    return mappedDaoFields.get(aAttrName);
  }

  public ProductUIFormFieldTypeBean() {
    super();

    this.productUIFormFieldType = new com.ourteam.product.ui.dao.ProductUIFormFieldType();
  }

  public ProductUIFormFieldTypeBean(
      com.ourteam.product.ui.dao.ProductUIFormFieldType productUIFormFieldType) {
    super();

    this.productUIFormFieldType = productUIFormFieldType;
  }

  public com.ourteam.product.ui.dao.ProductUIFormFieldType convertToProductUIFormFieldType() {
    return this.productUIFormFieldType;
  }

  public com.ourteam.product.ui.dao.ProductUIFormFieldType convertTo() {
    return this.productUIFormFieldType;
  }

  /**
   * Get id
   *
   * @return long
   */
  public long getId() {
    return (long) this.productUIFormFieldType.getId();
  }

  /**
   * Set id
   *
   * @parameter long
   */
  public void setId(long id) {

    this.productUIFormFieldType.setId(id);
  }

  /**
   * Get typeName
   *
   * @return String
   */
  public String getTypeName() {
    return (String) this.productUIFormFieldType.getTypeName();
  }

  /**
   * Set typeName
   *
   * @parameter String
   */
  public void setTypeName(String typeName) {

    this.productUIFormFieldType.setTypeName(typeName);
  }

  /**
   * Get typeWidget
   *
   * @return String
   */
  public String getTypeWidget() {
    return (String) this.productUIFormFieldType.getTypeWidget();
  }

  /**
   * Set typeWidget
   *
   * @parameter String
   */
  public void setTypeWidget(String typeWidget) {

    this.productUIFormFieldType.setTypeWidget(typeWidget);
  }

  /**
   * Get allowSubField
   *
   * @return String
   */
  public String getAllowSubField() {
    return (String) this.productUIFormFieldType.getAllowSubField();
  }

  /**
   * Set allowSubField
   *
   * @parameter String
   */
  public void setAllowSubField(String allowSubField) {

    this.productUIFormFieldType.setAllowSubField(allowSubField);
  }

  /**
   * Get lastModifyUser
   *
   * @return String
   */
  public String getLastModifyUser() {
    return (String) this.productUIFormFieldType.getLastModifyUser();
  }

  /**
   * Set lastModifyUser
   *
   * @parameter String
   */
  public void setLastModifyUser(String lastModifyUser) {

    this.productUIFormFieldType.setLastModifyUser(lastModifyUser);
  }

  /**
   * Get lastModifyTime
   *
   * @return java.util.Date
   */
  public java.util.Date getLastModifyTime() {
    return (java.util.Date) this.productUIFormFieldType.getLastModifyTime();
  }

  /**
   * Set lastModifyTime
   *
   * @parameter java.util.Date
   */
  public void setLastModifyTime(java.util.Date lastModifyTime) {

    this.productUIFormFieldType.setLastModifyTime(lastModifyTime);
  }

  /**
   * Get status
   *
   * @return String
   */
  public String getStatus() {
    return (String) this.productUIFormFieldType.getStatus();
  }

  /**
   * Set status
   *
   * @parameter String
   */
  public void setStatus(String status) {

    this.productUIFormFieldType.setStatus(status);
  }

  /**
   * Get remarks
   *
   * @return String
   */
  public String getRemarks() {
    return (String) this.productUIFormFieldType.getRemarks();
  }

  /**
   * Set remarks
   *
   * @parameter String
   */
  public void setRemarks(String remarks) {

    this.productUIFormFieldType.setRemarks(remarks);
  }

  /**
   * Get typeIcon
   *
   * @return String
   */
  public String getTypeIcon() {
    return (String) this.productUIFormFieldType.getTypeIcon();
  }

  /**
   * Set typeIcon
   *
   * @parameter String
   */
  public void setTypeIcon(String typeIcon) {

    this.productUIFormFieldType.setTypeIcon(typeIcon);
  }

  public int hashCode() {
    return org.apache.commons.lang.builder.HashCodeBuilder.reflectionHashCode(this);
  }

  public boolean equals(Object obj) {
    if (obj == null) {
      return false;
    } // end if

    if ((obj instanceof ProductUIFormFieldTypeBean) == false) {
      return false;
    } // end if

    ProductUIFormFieldTypeBean other = (ProductUIFormFieldTypeBean) obj;

    boolean isEqual = false;

    com.ourteam.product.ui.dao.ProductUIFormFieldType tempProductUIFormFieldType =
        other.convertToProductUIFormFieldType();

    if (tempProductUIFormFieldType == null || this.productUIFormFieldType == null) {
      isEqual = false;
    } else if (tempProductUIFormFieldType == this.productUIFormFieldType
        || tempProductUIFormFieldType.equals(this.productUIFormFieldType)) {
      isEqual = true;
    } else {
      isEqual = false;
    }

    return isEqual;
  }

  public static ProductUIFormFieldTypeBean[] toArray(
      com.ourteam.product.ui.dao.ProductUIFormFieldType[] aProductUIFormFieldTypes) {

    return toArray(aProductUIFormFieldTypes, null);
  }

  public static ProductUIFormFieldTypeBean[] toArray(
      com.ourteam.product.ui.dao.ProductUIFormFieldType[] aProductUIFormFieldTypes,
      IDataPopulateCallback aCallBack) {

    if (ArrayUtils.isEmpty(aProductUIFormFieldTypes)) {
      return new ProductUIFormFieldTypeBean[0];
    }

    int length = aProductUIFormFieldTypes.length;

    ProductUIFormFieldTypeBean[] beans = new ProductUIFormFieldTypeBean[length];

    for (int i = 0; i < length; i++) {
      beans[i] = new ProductUIFormFieldTypeBean(aProductUIFormFieldTypes[i]);
      if (aCallBack != null) {
        aCallBack.populate(beans[i], new Object[] {aProductUIFormFieldTypes[i]});
      }
    }

    return beans;
  }
}
